package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;
import javax.swing.JButton;

import javax.swing.JPanel;

import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
import javax.swing.table.AbstractTableModel;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VistaGoleadores extends javax.swing.JFrame {
	private JPanel panGoleadores;
	private JTable tblGoleadores;
	private JButton btnSalir;
	private JScrollPane scpListado;

	/**
	* Auto-generated main method to display this JFrame
	*/
		
	public VistaGoleadores() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				panGoleadores = new JPanel();
				getContentPane().add(panGoleadores, BorderLayout.CENTER);
				panGoleadores.setLayout(null);
				panGoleadores.setPreferredSize(new java.awt.Dimension(355, 224));

				{
					scpListado = new JScrollPane();
					panGoleadores.add(scpListado);
					scpListado.setBounds(45, 48, 338, 165);
					{
						tblGoleadores = new JTable();
						scpListado.setViewportView(tblGoleadores);
					}
				}
				{
					btnSalir = new JButton();
					panGoleadores.add(btnSalir);
					btnSalir.setText("Salir");
					btnSalir.setBounds(187, 235, 61, 23);
				}
			}
			pack();
			setSize(450, 350);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	public void agregarListener(ActionListener accion){
		btnSalir.addActionListener(accion);
	}

	
	public void TirarMensajeError(String mensaje){
		JOptionPane.showMessageDialog(this, mensaje);
	}

	public void setModelo(AbstractTableModel abstractTableModel){
		//tblCalendario.setModel(new DefaultTableModel());
		tblGoleadores.setModel(abstractTableModel);
	}
	
	

}
